package list.BianLi;

import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;

public class Test2 {
    public static void main(String[] args) {
        List<String> list=new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");

        ListIterator<String> it = list.listIterator();
        while(it.hasNext()){
            String s = it.next();
            if("b".equals(s)){
                it.add("q");
            }
        }
        System.out.println(list);
    }
}
